﻿Imports DAO
Imports DTO

Public Class SachBUS
    Public Function TimKiem(ByVal sCrt As SachCrt) As DataTable
        Dim sachdao = New SachDAO()
        Return sachdao.TimKiem(sCrt)
    End Function
    Public Function LaySach() As List(Of SachDTO)
        Dim dao As New SachDAO()

        Return dao.Laysach()

    End Function


    Public Function Themsach(ByVal strSQL As SachDTO) As Integer
        Dim dao As New SachDAO()

        Return dao.ThemSach(strSQL)

    End Function
    Public Function updatesach(ByVal strSQL As SachDTO) As Integer
        Dim dao As New SachDAO()

        Return dao.updatesach(strSQL)

    End Function

    Public Function xoasach(ByVal Masach As Int32) As Boolean
        Dim xoa As New SachDAO()
        Dim flag As Boolean = False

        If xoa.xoasach(Masach) > 0 Then
            flag = True
        End If
        Return flag
    End Function
End Class
